<div class="row">

  <div class="col-xs-12 col-sm-offset-1 col-sm-10">

    <div id="message-creating">
      <div class="message-main">
        <div class="message-container">

          <div class="receiver-add row">

            <!-- 待选择的接受人的指定方式 -->
            <div class="col col-md-3 col-xs-3">
              <select class="form-control"
                      ng-options="currentMethod.id as currentMethod.label for currentMethod in sendMethods"
                      ng-model="method">

              </select>
            </div>
            <!-- 具体的方式-->
            <div class="col col-md-6 col-xs-5" ng-switch on="method" ng-model="addMixed">

              <div ng-switch-when="1">
                <input class="form-control" type="text" ng-model="$parent.addMixed" placeholder="输入用户名或邮箱 (可用 '|' 分割)"/>
              </div>
              <!--
                        <div ng-switch-when="2">
                          <select class="form-control"
                                  ng-model="$parent.addMixed"
                                  ng-options="project.id as project.name for project in projectList"
                              >
                            <option value="">请选择项目</option>
                          </select>

                        </div>
              -->
            </div>

            <div class="col col-md-3 col-xs-4">
              <button class="btn btn-primary" ng-click="addReceiver()" ng-disabled="! addMixed ">添加收信人</button>
            </div>
          </div>
          <div class="receiver-list-box">

            <!-- 收信人的列表 -->
            <ul class="receiver-list">

              <li ng-repeat="receiver in receiverSet">
                <span class="receiver-name">{{ receiver.username }}</span>
                <button type="button" class="close close-button" ng-click="removeReceiver(receiver.id)" ><span>&times;</span></button>
              </li>

            </ul>
          </div>

          <div class="message">

            <input class="form-control" type="text" placeholder="请输入私信标题" ng-model="message.title" style="margin-bottom: 1em"/>

            <textarea  ng-model="message.content" rows="12" placeholder="请输入私信内容" markdown-editor >
            </textarea>


            <div class="button-group text-center">
              <button class="btn btn-primary submit"
                      ng-click="sendMessage()"
                      ng-disabled="! message.title || !message.content"

                  >
                发送
              </button>
              <button class="btn btn-warning reset" ng-click="resetScope()">重置</button>

            </div>
          </div>
        </div>
      </div>


    </div>
  </div>

</div>

